<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            background-repeat: no-repeat;
            background-size: cover;
        }
    </style>
</head>
<body>
    <h1>领航初见面</h1>
    <button onclick="editText()">点这儿有惊喜喔！</button>

    <p id="linghang">linghangstudio<span>!!!</span></p>

    <!-- <div id="text" ondblclick="setColor()" 
                   onmouseover="setFontSize()"
                   >linghang</div> -->

    <button onclick="getTime()">getTime</button>
    <div id="emtime" onmouseover="setBorder()"></div>

    <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1536461203,2468313050&fm=26&gp=0.jpg" onclick="setback1()"/>

    <img src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1585829999,2436051513&fm=26&gp=0.jpg" onclick="setback2()"/>

    <img src="https://gss0.baidu.com/70cFfyinKgQFm2e88IuM_a/forum/w=580/sign=6e3b71dd9f2f07085f052a08d926b865/25d69eec08fa513dcf7a0f4c3c6d55fbb3fbd92e.jpg" onclick="setback3()"/>
</body>



<script>
    console.log("123")
    const x=123
    console.log(x)
    let lh={
        name:"领航",
        age:"20"
    }
    console.log(lh.name);
    console.log(lh.age);
    
    function editText(){
        document.getElementById("linghang").innerHTML="LH"

    let time=new Date();
    console.log(time);
    console.log(time.getFullYear());
    console.log(time.getMonth()+1);
    console.log(time.getDate());
    console.log(time.getHours());
    console.log(time.getMinutes());
    console.log(time.getSeconds());
    }

    let lh1=document.getElementById("linghang");
    console.log(lh1)
    let lh2=document.getElementById("linghang").innerHTML;
    console.log(lh2)
    let lh3=document.getElementById("linghang").innerText;
    console.log(lh3)

    // function setColor(){
    //     document.getElementById("text").style.color="green"
    // }
    // function setFontSize(){
    //     document.getElementById("text").style.fontSize="40px"
    // }
    
    function getTime(){
        document.getElementById("linghang").innerHTML="LH"

    let newtime=new Date();
    console.log(newtime);
    console.log(newtime.getFullYear());
    console.log(newtime.getMonth()+1);
    console.log(newtime.getDate());
    console.log(newtime.getHours());
    console.log(newtime.getMinutes());
    console.log(newtime.getSeconds());

    // document.write(newtime.getFullYear()+"-"
    //                +(newtime.getMonth()+1)+"-"
    //                +newtime.getDate()+" "
    //                +newtime.getHours()+":"
    //                +newtime.getMinutes()+":"
    //                +newtime.getSeconds());
    document.getElementById("emtime").innerHTML=newtime.getFullYear()+"-"
                                                +(newtime.getMonth()+1)+"-"
                                                +newtime.getDate()+" "
                                                +newtime.getHours()+":"
                                                +newtime.getMinutes()+":"
                                                +newtime.getSeconds()
    }
    
    function setBorder(){
        document.getElementById("emtime").style.border="0.5px green solid"
    }     
   
    function setback1(){
        document.body.style.backgroundImage="url(https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1536461203,2468313050&fm=26&gp=0.jpg)"
    }
    function setback2(){
        document.body.style.backgroundImage="url(https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1585829999,2436051513&fm=26&gp=0.jpg)"
    } 
    function setback3(){
        document.body.style.backgroundImage="url(https://gss0.baidu.com/70cFfyinKgQFm2e88IuM_a/forum/w=580/sign=6e3b71dd9f2f07085f052a08d926b865/25d69eec08fa513dcf7a0f4c3c6d55fbb3fbd92e.jpg)"   
    } 
</script>
</html>